/* eslint valid-jsdoc: "off" */



/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1630997780646_8495';

  // add your middleware config here
  config.middleware = [];

  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
  };

  config.jwt = {secret:"zhang"}



  config.view ={  defaultViewEngine:'nunjucks'}
  // 连接数据库
  config.sequelize = {
    dialect:"mysql",
    database:"xiaozhoucms",
    host:'localhost',
    port:3306,
    username:'root',
    password:'zxl327',
    timezone: '+08:00',
  }

  config.security = {csrf:{enable:false,},};

  config.cors={  
    origin:"*", //""代表所有的跨域请求  
    allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH'
}

config.static = {
  prefix: '/', //访问路径
  // dir:path.join(appInfo.baseDir, 'app/public'), //设置静态文件目录
};
  
  return {
    ...config,
    ...userConfig,
  };
};
